home *** CD-ROM | disk | FTP | other *** search
/ Belgian Amiga Club - ADF Collection / BS1 part 26.zip / BS1 part 26 / Aztec C v5.2a disk 4.adf / 204inc_h.lzh / exec / libraries.h < prev    next >
C/C++ Source or Header  |  1991-03-14  |  2KB  |  68 lines

  1. #ifndef    EXEC_LIBRARIES_H
  2. #define    EXEC_LIBRARIES_H
  3. /*
  4. **    $Filename: exec/libraries.h $
  5. **    $Release: 2.04 $
  6. **    $Revision: 36.10 $
  7. **    $Date: 90/05/10 $
  8. **
  9. **    Definitions for use when creating or using Exec libraries
  10. **
  11. **    (C) Copyright 1985,1986,1987,1988,1989 Commodore-Amiga, Inc.
  12. **        All Rights Reserved
  13. */
  14.  
  15. #ifndef EXEC_NODES_H
  16. #include "exec/nodes.h"
  17. #endif /* EXEC_NODES_H */
  18.  
  19.  
  20. /*------ Special Constants ---------------------------------------*/
  21. #define LIB_VECTSIZE    6    /* Each library entry takes 6 bytes */
  22. #define LIB_RESERVED    4    /* Exec reserves the first 4 vectors */
  23. #define LIB_BASE    (-LIB_VECTSIZE)
  24. #define LIB_USERDEF    (LIB_BASE-(LIB_RESERVED*LIB_VECTSIZE))
  25. #define LIB_NONSTD    (LIB_USERDEF)
  26.  
  27. /*------ Standard Functions --------------------------------------*/
  28. #define LIB_OPEN    (-6)
  29. #define LIB_CLOSE    (-12)
  30. #define LIB_EXPUNGE    (-18)
  31. #define LIB_EXTFUNC    (-24)    /* for future expansion */
  32.  
  33. /*------ Library Base Structure ----------------------------------*/
  34. /* Also used for Devices and some Resources */
  35. struct Library {
  36.     struct  Node lib_Node;
  37.     UBYTE   lib_Flags;
  38.     UBYTE   lib_pad;
  39.     UWORD   lib_NegSize;        /* number of bytes before library */
  40.     UWORD   lib_PosSize;        /* number of bytes after library */
  41.     UWORD   lib_Version;        /* major */
  42.     UWORD   lib_Revision;        /* minor */
  43.     APTR    lib_IdString;        /* ASCII identification */
  44.     ULONG   lib_Sum;            /* the checksum itself */
  45.     UWORD   lib_OpenCnt;        /* number of current opens */
  46. };    /* Warning: size is not a longword multiple! */
  47.  
  48. /* lib_Flags bit definitions (all others are system reserved) */
  49. #define LIBF_SUMMING    (1<<0)        /* we are currently checksumming */
  50. #define LIBF_CHANGED    (1<<1)        /* we have just changed the lib */
  51. #define LIBF_SUMUSED    (1<<2)        /* set if we should bother to sum */
  52. #define LIBF_DELEXP    (1<<3)        /* delayed expunge */
  53.  
  54.  
  55. /* Temporary Compatibility */
  56. #define lh_Node    lib_Node
  57. #define lh_Flags    lib_Flags
  58. #define lh_pad        lib_pad
  59. #define lh_NegSize    lib_NegSize
  60. #define lh_PosSize    lib_PosSize
  61. #define lh_Version    lib_Version
  62. #define lh_Revision    lib_Revision
  63. #define lh_IdString    lib_IdString
  64. #define lh_Sum        lib_Sum
  65. #define lh_OpenCnt    lib_OpenCnt
  66.  
  67. #endif    /* EXEC_LIBRARIES_H */
  68.